*DemSanct.do*Requires loading DemSanct.dta first*NB: standard relogitq does not report enough significant digits for predicted probabilities.*    before running this code, do a search & replace for %8.5f with %12.9f in relogitq.ado*Generate interaction termsgen demdyad_lag=tdem_lag*sdem_laggen us_relpow_lag=us_lag*relpow_laggen us_demdyad_lag=us_lag*demdyad_lag*Generate dyadcodegen dyadcode=ccode1*1000+ccode2*Table 2, Columns 1-4:sanctRelDyads, lagged, clustered, lower-order terms, no yearrelogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag sancyear _spline1 _spline2 _spline3, cluster(dyadcode)relogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag us_lag sancyear _spline1 _spline2 _spline3, cluster(dyadcode)relogit sanction demdyad_lag sdem_lag tdem_lag lnimp_lag relpow_lag ally_lag sancyear _spline1 _spline2 _spline3, cluster(dyadcode)relogit sanction demdyad_lag sdem_lag tdem_lag lnimp_lag relpow_lag ally_lag us_lag sancyear _spline1 _spline2 _spline3, cluster(dyadcode)*Table 3, Column 1: Repeat of Table 2, Column 2relogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag us_lag sancyear _spline1 _spline2 _spline3, cluster(dyadcode)*Column 2: add demdyad*us and relpow*usrelogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag us_lag us_demdyad_lag us_relpow_lag sancyear _spline1 _spline2 _spline3, cluster(dyadcode)*Column 3: add traDep1relogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag us_lag us_demdyad_lag us_relpow_lag traDep1_lag sancyear _spline1 _spline2 _spline3, cluster(dyadcode)*Table 4setx mediansetx _spline1 0 _spline2 0 _spline3 0 sancyear 0setx lnexp_lag mean relpow_lag mean traDep1_lag meanrelogitqrelogitq, fd(pr) changex(demdyad_lag 0 1)relogitq, fd(pr) changex(sdem_lag 0 1)summarize lnexp_lag*mean = 1.044242 sd = 1.801069relogitq, fd(pr) changex(lnexp_lag mean 2.845311) summarize relpow_lag*mean = 0 sd = 5.358106relogitq, fd(pr) changex(relpow_lag mean 5.358106)relogitq, fd(pr) changex(ally_lag 0 1)summarize traDep1_lag*mean = 0 sd = 0.012437relogitq, fd(pr) changex(traDep1_lag mean 0.12437)relogitq, fd(pr) changex(us_lag 0 1)*Correlationscorrel sanction demdyad_lag sdem_lag lnexp_lag relpow_lag ally_lag us_lag traDep1_lag*Rchecks: EU and interactions (next-to-last para. in Analysis)gen eu_relpow_lag=EU1_lag*relpow_laggen eu_demdyad_lag=EU1_lag*demdyad_lagrelogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag us_lag EU1_lag sancyear _spline1 _spline2 _spline3, cluster(dyadcode)relogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag us_lag EU1_lag eu_relpow_lag eu_demdyad_lag sancyear _spline1 _spline2 _spline3, cluster(dyadcode)relogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag traDep1_lag us_lag EU1_lag eu_relpow_lag eu_demdyad_lag sancyear _spline1 _spline2 _spline3, cluster(dyadcode)*Rchecks: (Footnote 8, all models using "sanctions-relevant" dyads)*Table 2 on sanctRelDyad==1relogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag sancyear _spline1 _spline2 _spline3 if sanctRelDyad==1, cluster(dyadcode)relogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag us_lag sancyear _spline1 _spline2 _spline3 if sanctRelDyad==1, cluster(dyadcode)relogit sanction demdyad_lag sdem_lag tdem_lag lnimp_lag relpow_lag ally_lag sancyear _spline1 _spline2 _spline3  if sanctRelDyad==1, cluster(dyadcode)relogit sanction demdyad_lag sdem_lag tdem_lag lnimp_lag relpow_lag ally_lag us_lag sancyear _spline1 _spline2 _spline3 if sanctRelDyad==1, cluster(dyadcode)*Table 3 on sanctRelDyad==1relogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag us_lag sancyear _spline1 _spline2 _spline3 if sanctRelDyad==1, cluster(dyadcode)relogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag us_lag us_demdyad_lag us_relpow_lag sancyear _spline1 _spline2 _spline3 if sanctRelDyad==1, cluster(dyadcode)relogit sanction demdyad_lag sdem_lag tdem_lag lnexp_lag relpow_lag ally_lag us_lag us_demdyad_lag us_relpow_lag traDep1_lag sancyear _spline1 _spline2 _spline3 if sanctRelDyad==1, cluster(dyadcode)